From 3bbbb0c96c03814cb208f6bf9167c95a94f0bbcb Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 27 Jan 2011 14:59:04 +0000 Subject: [PATCH] libxc: provide XENCTRL_HAS_XC_INTERFACE feature test macro This makes it easier for out-of-tree callers to tell which version of the libxc interface this version of xenctrl.h provides. Signed-off-by: Ian Jackson Acked-by: Ian Campbell Committed-by: Ian Jackson --- tools/libxc/xenctrl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h index 00c6f4425e..971daf02bc 100644 --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -88,6 +88,16 @@ #endif +#define XENCTRL_HAS_XC_INTERFACE 1 +/* In Xen 4.0 and earlier, xc_interface_open and xc_evtchn_open would + * both return ints being the file descriptor. In 4.1 and later, they + * return an xc_interface* and xc_evtchn*, respectively - ie, a + * pointer to an opaque struct. This #define is provided in 4.1 and + * later, allowing out-of-tree callers to more easily distinguish + * between, and be compatible with, both versions. + */ + + /* * GENERAL * -- 2.30.2